import { inject, observer } from "mobx-react";
import React from "react";

@inject('apple')
@observer
class AppleBusket extends React.Component {
  /** 获取未吃苹果的组件数组*/
  render() {
    const { noEatApplesCount, eatApplesWeight, noEatApplesWeight, eatApplesCount} = this.props.apple
    return (
      <>
        <div className="title">苹果篮子</div>
        <div className="stats">
          <div className="section">
            <div className="head">当前</div>
            <div className="content">{noEatApplesCount}个苹果，{noEatApplesWeight}克</div>
          </div>
          <div className="section">
            <div className="head">已吃掉</div>
            <div className="content">{eatApplesCount}个苹果，{eatApplesWeight}克</div>
          </div>
        </div>
      </>
    );
  }
}

export default AppleBusket;
